
cmake_minimum_required(VERSION 3.18)

project(while LANGUAGES CXX)



set(i 1)
 
while(i LESS_EQUAL 5)
    message(STATUS "i = ${i}")
    math(EXPR i "${i} +1") # i++
endwhile()


set(i 6)
while(i GREATER_EQUAL 8)
    message(STATUS "i = ${i}")
    math(EXPR i "${i} +1") # i++
endwhile()

set(i 1)
while(i EQUAL 5)
    message(STATUS "i = ${i}")
    math(EXPR i "${i} +1") # i++
endwhile()